YARN-11359. [Federation] Routing admin invocations transparently to multiple RMs.#5057
YARN-11359. [Federation] Routing admin invocations transparently to multiple RMs.#5057goiri merged 19 commits intoapache:trunkfrom
Conversation
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
...-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/RouterServerUtil.java
Show resolved
Hide resolved
| return subClusterIds.get(rand.nextInt(subClusterIds.size())); | ||
| } | ||
|
|
||
| public static UserGroupInformation setupUser(String userName) { |
| /** | ||
| * Class to define admin method,params and arguments. | ||
| */ | ||
| public class AdminMethod { |
There was a problem hiding this comment.
Is there anything really admin about this class?
There was a problem hiding this comment.
This class is created to be used when the RMAdmin interface is called, so this class is called AdminMethod.
|
|
||
| import java.io.IOException; | ||
| import java.lang.reflect.Method; | ||
| import java.util.*; |
| return new String[0]; | ||
| } | ||
|
|
||
| <R> Collection<R> invokeConcurrent(AdminMethod request, Class<R> clazz) |
There was a problem hiding this comment.
Don't we have very similar methods in other places?
Can we refactor?
There was a problem hiding this comment.
Thank you very much for your suggestion, I will refactor this part of the code.
| MockNM mockNM = mockNMs.getOrDefault(subClusterId, null); | ||
| try { | ||
| mockNM.unRegisterNode(); | ||
| mockNM = null; |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
@goiri Thank you very much for your help in reviewing the code! |
JIRA: YARN-11359. [Federation] Routing admin invocations transparently to multiple RMs.
The YARN Router does not support calling SubCluster's RMAdmin directly.
If we want to use management commands in Federation mode, we still need to find the Yarn client of the specified SubCluster, and then execute the Yarn management command.
The JIRA(YARN-11351) plan will enhance the router's capabilities, provide a set of CLI commands, and execute SubCluster RM management commands on the Router side.
This JIRA (YARN-11359) is a Sub-Task of YARN-11351, the purpose is to create
FederationRMAdminInterceptor, complete multi-RM access support, and complete Junit tests.FederationRMAdminInterceptor contains many methods, which will be implemented separately by submitting PR. This PR only completes the refreshQueues method.